package com.eden.api.controller;

import com.eden.api.controller.vo.ApiResult;
import com.eden.school.domain.SchoolUser;
import com.eden.school.service.ISchoolUserService;
import com.eden.system.domain.SysDept;
import com.eden.system.service.ISysDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.eden.api.controller.vo.ApiResult.success;

/**
 * @program: eden
 * @description: 客户端我的页面
 * @author: Mr.Jiao
 * @create: 2021-03-11 15:01
 */

@Slf4j
@Api("我的页面客户端")
@RestController
@RequestMapping("/api/my")
public class ApiMyController {

    @Autowired
    private ISysDeptService sysDeptService;
    @Autowired
    private ISchoolUserService schoolUserService;
    //查询个人用户信息
//    @ApiOperation("加载个人信息")
//    @PostMapping("/selectMySelf")
//    public ApiResult selectMySelf(@Validated @RequestBody SchoolUserVo mySelf) {
//        return success("查询成功！！", chatLists);
//    }

    //修改个人用户信息
    @ApiOperation("修改个人用户信息")
    @GetMapping("/updateMyself")
    public ApiResult updateMyself(@Validated @RequestBody SchoolUser mySelf) {
        schoolUserService.updateSchoolUser(mySelf);
        return success("更新成功");
    }

}
